\section{Kinematic orbit determination of LEO satellites}\label{cookbook.kinematicOrbit}

This cookbook chapter describes exemplarily the steps for determining kinematic orbits of low-Earth orbit (LEO) satellites.

\subsection{Prepare LEO meta data}
\begin{enumerate}
  \item For creating the \file{GnssStationInfo file}{gnssStationInfo} use \program{GnssStationInfoCreate}. The rotation from the
  satellite reference frame into the antenna reference frame as well as the change of the center of mass due to fuel consumption has to be considered here.
  \item The \file{GnssReceiverDefinition file}{gnssReceiverDefinition} can be created by using \program{GnssReceiverDefinitionCreate}. In this program the different GNSS types has to be specified.
  \item For creating the \file{GnssAntennaDefinition file}{gnssAntennaDefinition}\ use \program{GnssAntennaDefinitionCreate}. This program considers the phase center offsets of L1 and L2 frequency from the used antenna.
  \item For determining the elevation dependent accuracies the program \program{GnssAntennaDefinitionCreate} is used again.
  \begin{itemize}
    \item \config{antenna}: set to new
    \item Set the \config{pattern}s for code (\config{type}=\verb|C**|) and phase
    (\config{type}=\verb|L**|). The standard deviation is expressed e.g. with \config{values}=\verb|0.001/cos(2*PI/180*zenith)|.
  \end{itemize}
\end{enumerate}

\subsection{Read LEO data}
\begin{enumerate}
  \item Conversion of the approximated orbit and star camera data into GROOPS format using a conversion program.
  \item If no attitude data is given the star camera data can be simulated by using \program{SimulateStarCamera} or \program{SimulateStarCameraSentinel1}.
  \item The GNSS observation data (given in RINEX format) can be converted with \program{RinexObservation2GnssReceiver}.
  \item Suitable programs to get daily data are \program{InstrumentConcatenate} and \program{InstrumentSynchronize}.
  \item For interpolating the orbit and star camera data to GNSS receiver epochs use \program{InstrumentResample} and specify GNSS receiver as input for
  \config{timeSeries}.
  \item For synchronizing these data use \program{InstrumentSynchronize}
\end{enumerate}
Detailed description of instrument data handling can be found in \reference{Instrument data handling}{cookbook.instrument}.

\subsection{Prepare GNSS satellite metadata, orbits, and clocks}
The cookbook chapter on \reference{GNSS precise point positioning (PPP)}{cookbook.gnssPpp} details how to prepare the GNSS satellite
\reference{metadata}{cookbook.gnssPpp:metadata} and \reference{orbits}{cookbook.gnssPpp:orbitPreparation}.
Use \program{GnssClockRinex2InstrumentClock} to convert satellite clock errors.

\subsection{Estimate kinematic orbits}

For kinematic orbit determination use \program{GnssProcessing}. The GNSS constellations have to be defined via
\configClass{transmitter}{gnssParametrizationTransmitterType} which requires for example the signal bias and clock data.
The LEO satellite can be defined via \configClass{receiver:lowEarthOrbiter}{gnssParametrizationReceiverType:lowEarthOrbiter} which requires for example the
GNSS observations, the star camera and approximated orbit data. The impact of the ionosphere can be considered via
\configClass{ionosphere}{gnssParametrizationIonosphereType} and the estimation of the earth rotation parameters is done
with \configClass{earthRotation}{gnssParametrizationEarthRotationType}. The ambiguity resolution settings can be specified via
\configClass{ambiguities}{gnssParametrizationAmbiguitiesType}.

The processing flow is controlled via a list of processing steps \configClass{processingStep}{gnssProcessingStepType}. The processing steps are
processed consecutively. Some steps allow the selection of parameters,
epochs, or the normal equation structure, which affects all subsequent steps.

\begin{enumerate}
    \item \configClass{processingStep:selectParameters}{gnssProcessingStepType}:  Parameters which should be estimated have to be enabled.
    Consider the linear dependencies between the STEC and the VTEC as well as between the STEC and particular signal biases. This means, if STEC parameter
    is enabled it is not possible to estimate the VTEC and TEC bias, so these parameters have to be be disabled.
    \item \configClass{processingStep:estimate}{gnssProcessingStepType}: Estimation of the parameters. The number of iterations can be set with
    \config{maxIterationCount}. The weights will be iteratively adjusted.
    \item Estimation of the TEC bias parameter using \configClass{processingStep:selectParameters}{gnssProcessingStepType} and
    \configClass{processingStep:estimate}{gnssProcessingStepType}. Only \config{estimateReceiverTecBias} parameter has to be selected.
    \item \configClass{processingStep:estimate}{gnssProcessingStepType}: Further estimation of the parameters.
    \item Solving the ambiguities via \configClass{processingStep:resolveAmbiguities}{gnssProcessingStepType}.
    \item Further estimations of the parameters and the TEC bias parameter by using \configClass{processingStep:estimate}{gnssProcessingStepType}.
    \item Computation of the epoch-wise covariance matrix can be done via \configClass{processingStep:computeCovarianceMatrix}{gnssProcessingStepType}.
    \item \configClass{processingStep:writeResults}{gnssProcessingStepType}: Write estimation results into output files.
\end{enumerate}




% =============================================================
